<!DOCTYPE html>
<html class="iframe-h" xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta charset="UTF-8">
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>网站后台管理模版</title>
		<link rel="stylesheet" type="text/css" th:href="@{/layui/css/layui.css}"/>
		<link rel="stylesheet" type="text/css" th:href="@{/css/admin.css}"/>
	</head>

	<body>
		<div class="wrap-container clearfix">
				<div class="column-content-detail">
					<form class="layui-form" action="">
						<div class="layui-form-item">
							<div class="layui-inline tool-btn">
								<button class="layui-btn layui-btn-small layui-btn-normal addBtn" data-url="/qingjiaAdd"><i class="layui-icon">&#xe654;</i></button>
								<button class="layui-btn layui-btn-small layui-btn-danger delBtn"  data-url="article-add.html"><i class="layui-icon">&#xe640;</i></button>
								<button class="layui-btn layui-btn-small layui-btn-warm listOrderBtn hidden-xs"><i class="iconfont">&#xe656;</i></button>
							</div>
							<!--<div class="layui-inline">
								<input type="text" name="title" required lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
							</div>-->
							<div class="layui-inline">
								<select name="states" lay-filter="status" id="status">
									<option value="" disabled>请选择一个状态</option>
									<option value="0">审批中</option>
									<option value="1">我的审批</option>
									<option value="9">审批结束</option>
								</select>
							</div>
							<!--<button class="layui-btn layui-btn-normal" lay-submit="search">搜索</button>-->
						</div>
					</form>
					<table class="layui-table" lay-data="{height: 'full', cellMinWidth: 80,  limit:15,limits:[15,30],
						url:'/myVac', page:true, id:'test'}" lay-filter="test" id="test">
						<thead>
						<tr>
							<th lay-data="{type:'checkbox'}">ID</th>
							<th lay-data="{field:'applyUser',align:'center'}">申请人</th>
							<th lay-data="{field:'days',align:'center'}">请假天数</th>
							<th lay-data="{field:'reason', align:'center'}">请假原因</th>
							<th lay-data="{field:'auditor', align:'center'}">审批人</th>
							<th lay-data="{field:'result', align:'center'}">审批结果</th>
						</tr>
						</thead>
					</table>

				</div>
		</div>


		<script th:src="@{/layui/layui.js}" type="text/javascript" charset="utf-8"></script>
		<script th:src="@{/js/common.js}" type="text/javascript" charset="utf-8"></script>
		<script>
			layui.use(['table','tree'], function() {
				var table = layui.table,
					form = layui.form,
					tree = layui.tree;

				table.on('tool(test)', function(obj){
					var data = obj.data;


				});
                form.on('select(status)', function(data) {
                    var type = data.value;
                    table.reload('test', {
                        page: {
                            curr: 1 //重新从第 1 页开始
                        }
                        , where: {
                            type: type
                        }
                    })
                })

            });

		</script>
	</body>

</html>